package com.bhms.module.datasource.hr.action;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.bhms.module.datasource.hr.mapper.Dept;
import com.bhms.module.datasource.hr.service.DataSourceService;
import com.sunshulin.common.action.GeneralAction;

public class DataSourceTestAction extends GeneralAction {

	private static final long serialVersionUID = -3880120758633535341L;

	private DataSourceService dataSourceService;
	
	private Test test = new Test();
	
	private String name = "F_EN";

	private String forwardJsp;
	
	@Override
	public String execute() throws Exception {
		List<Dept> deptList = new ArrayList<Dept>();
		deptList.add(new Dept("HL001", "A11G28", "测试部门1", "部门1" , "201", "",new Date(),"A"));
		dataSourceService.incrementalProcess(deptList, null);
		return SUCCESS;
	}
	
	public String forward() throws Exception {
		test.setName("F_SN");
		test.setCity("北京");
		test.setDistrict("朝阳");
		test.setBussion("马甸");
		test.setCycle("三环");
		test.setFace("北");
		test.setSubway("10号线");
		test.setStation("北土城");
		return SUCCESS;
	}

	public String getForwardJsp() {
		return forwardJsp;
	}

	public void setForwardJsp(String forwardJsp) {
		this.forwardJsp = forwardJsp;
	}

	public void setDataSourceService(DataSourceService dataSourceService) {
		this.dataSourceService = dataSourceService;
	}

	public Test getTest() {
		return test;
	}

	public void setTest(Test test) {
		this.test = test;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
